package com.common.retrofit.methods;

import com.common.retrofit.base.BaseMethods;
import com.common.retrofit.service.HaiNingService;

import rx.Observable;
import rx.Subscriber;

public class PublishDongTaiMethods extends BaseMethods {

    private static PublishDongTaiMethods m_ins = null;

    public static PublishDongTaiMethods getInstance() {
        if (m_ins == null) {
            synchronized (PublishDongTaiMethods.class) {
                if (m_ins == null) {
                    m_ins = new PublishDongTaiMethods();
                }
            }
        }
        return m_ins;
    }

    @Override
    protected String getHttpUrl() {
        return "Friend/";
    }

    private HaiNingService initService() {
        return getRetrofit().create(HaiNingService.class);
    }


    public void send_dynamic(Subscriber<Object> subscriber,
                      int uid,
                      String hashid,String content,String pic ) {
        Observable observable = initService().send_dynamic(System.currentTimeMillis()+"",
                "3a5889e2cc8cfce3e4db25db3f8fb2ea",uid,hashid,content,pic
        );
        toSubscribe(observable, subscriber);
    }
}
